<?php

class cargaInicial_c extends CI_Controller {

    public function __construct() {
        parent:: __construct();
        $this->load->model('cargaInicial_m');
        $this->load->library('encrypt');
    }

    public function index() {
        $this->realizarCargaInicial();
    }
    
    public function realizarCargaInicial(){
        // CREAR USAURIO
        $this->cargaInicial_m->generarUsuarios('yama',$this->encrypt->sha1('yama'));
        $this->cargaInicial_m->generarUsuarios('juan',$this->encrypt->sha1('juan'));
        $this->cargaInicial_m->generarUsuarios('pedro',$this->encrypt->sha1('pedro'));
        $this->cargaInicial_m->generarUsuarios('luis',$this->encrypt->sha1('luis'));
        $this->cargaInicial_m->generarUsuarios('lucas',$this->encrypt->sha1('lucas'));
        $this->cargaInicial_m->generarUsuarios('lucio',$this->encrypt->sha1('lucio'));
        $this->cargaInicial_m->generarUsuarios('marcos',$this->encrypt->sha1('marcos'));
        $this->cargaInicial_m->generarUsuarios('ricardo',$this->encrypt->sha1('ricardo'));
        $this->cargaInicial_m->generarUsuarios('vicente',$this->encrypt->sha1('vicente'));
        
        //CREAR ROLES
        //$this->cargaInicial_m->generarRol('administador');
        //$this->cargaInicial_m->generarRol('usuarioPortal');
        
        //CREAR PERSONAS
        //generarPersonas($nombre,$apellido,$doc,$fechaNac,$sexo,$email,$telefono)
        $this->cargaInicial_m->generarPersonas('Juan','Perez','454875441','05-05-1985',1,'jp@gmail.com','5487545454');
        $this->cargaInicial_m->generarPersonas('Yamandu','Romani','45874154','03-04-1970',1,'yr@gmail.com','5487854234');
        $this->cargaInicial_m->generarPersonas('Pedro','Dominguez','454875441','05-05-1944',1,'ll@gmail.com','574872421');
        $this->cargaInicial_m->generarPersonas('Marcos','Rodriguez','454875441','05-05-1953',1,'lu@gmail.com','4578468432');
        $this->cargaInicial_m->generarPersonas('Bautista','Possamay','444875441','05-05-1953',1,'bp@gmail.com','235235235');
        
        //Vincular PERSONA_USUARIO
        $this->cargaInicial_m->generarPersonasUsuario(1,1);
        $this->cargaInicial_m->generarPersonasUsuario(2,2);
        $this->cargaInicial_m->generarPersonasUsuario(3,3);
        $this->cargaInicial_m->generarPersonasUsuario(4,4);
        $this->cargaInicial_m->generarPersonasUsuario(5,5);
        
        //CREAR EQUIPOS
        
        //CREAR 
        
    }
    
}
?>
